<template>
  <div>
    <!-- <MyLogin></MyLogin>
    <MyInfo></MyInfo> -->
    <button @click="comName='MyInfo'">按钮</button>
    <button @click="comName='MyLogin'">按钮2</button>
    <component :is="comName"></component>
  </div>
</template>

<script>
import MyLogin from "./components/MyLogin.vue";
import MyInfo from "./components/MyInfo.vue";

export default {
  data() {
    return {
      comName: 'MyLogin'
    };
  },
  components: {
    MyLogin,
    MyInfo,
  },
  
};
</script>

<style scoped></style>
